package com.qvtu.web.config;

import lombok.Data;

@Data
public class AjaxResult {
    private int code = 0;
    private String msg ="操作成功" ;
    private Object data;
    public AjaxResult() {
    }
    public AjaxResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public AjaxResult(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    public static AjaxResult success(){
        return new AjaxResult();
    }
    public static AjaxResult error(){
        return new AjaxResult(-1,"未知错误");
    }
}
